﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JShiwork.Devices.Interface
{
   /// <summary>
   /// 打印完成委托
   /// </summary>
   /// <param name="data"></param>
   public delegate void PrintMessageFinishedEventHandler(string data);
   /// <summary>
   /// 远程服务委托
   /// </summary>
   /// <param name="data"></param>
   public delegate void HostErrEventHandler(string mDescription);
   /// <summary>
   /// 错误描述委托
   /// </summary>
   /// <param name="mDes"></param>
   public delegate void ErrEventHandler(string mDescription);
   /// <summary>
   /// 赋码设备-接口
   /// </summary>
   public interface Interface_Printer
   {
       /// <summary>
       /// 打印完成事件
       /// </summary>
       event PrintMessageFinishedEventHandler PrintMessageFinished;
       /// <summary>
       /// 打开设备端口
       /// </summary>
       /// <param name="Port"></param>
       /// <param name="Baudrate"></param>
       /// <returns></returns>
       bool _Open(int Port, int Baudrate);
       /// <summary>
       /// 打开设备端口
       /// </summary>
       /// <param name="mAddr"></param>
       /// <param name="mPort"></param>
       /// <returns></returns>
       bool _Open(string mAddr, int mPort);
       /// <summary>
       /// 关闭端口
       /// </summary>
       void _Close();
       /// <summary>
       /// 开启工作线程
       /// </summary>
       void _StartJob();
       /// <summary>
       /// 关闭工作线程
       /// </summary>
       void _StopJob();
       /// <summary>
       /// 发送打印数据
       /// </summary>
       /// <param name="Value"></param>
       /// <returns></returns>
       bool Print_A_Data(string[] Value);

   }
}
